package org.dawing.shop.cart.infrastructure.rpc;

import org.dawing.shop.cart.common.config.FeignConfiguration;
import org.dawing.shop.cart.common.dto.InventoryDto;
import org.dawing.shop.cart.infrastructure.rpc.fb.InventoryServiceFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by Administrator on 2017/6/14.
 */
@FeignClient(name = "productService",fallback = InventoryServiceFallback.class,configuration = FeignConfiguration.class)
public interface ProductService {

    @RequestMapping(value = "/product/{id}",method = RequestMethod.GET)
    InventoryDto getInventory(@PathVariable("id") String id);


}
